/* Coding style ok */

#ifndef SETUP_GUI_H_
#define SETUP_GUI_H_

#include <Etk.h>

/* Libsylph includes */
#include <sylph/sylmain.h>
#include <sylph/prefs_common.h>
#include <sylph/prefs.h>
#include <sylph/account.h>

typedef struct _Setup_Gui {
    // Main widgets
    Etk_Widget *win;
    Etk_Widget *vbox;
    Etk_Widget *btn_hbox;
    Etk_Widget *btn_ok;
    Etk_Widget *btn_next_end;
    Etk_Widget *btn_cancel;

    // General widgets
    Etk_Widget *label;

    // Mailbox selection widgets
    Etk_Widget *mbox_entry;
    Etk_Widget *frame_mailbox;
    Etk_Widget *frame_mailbox_vbox;
    Etk_Widget *chkbtn_skip_account_setup;

    // Basic account widgets
    Etk_Widget *frame_account;
    Etk_Widget *frame_account_vbox;
    Etk_Widget *frame_account_hbox;
    Etk_Widget *account_name_entry;
    Etk_Widget *full_name_entry;
    Etk_Widget *email_addr_entry;
    Etk_Widget *pop3_server_entry;
    Etk_Widget *pop3_username_entry;
    Etk_Widget *pop3_password_entry;
    Etk_Widget *smtp_server_entry;
    Etk_Widget *smtp_username_entry;
    Etk_Widget *smtp_password_entry;
} Setup_Gui;

void build_setup_gui(void);
void _setup_quit_cb(void *data);
void _mbox_entry_text_changed(Etk_Widget *widget, void *data);
void _btn_ok_cb(Etk_Button *button, void *data);
void _skip_account_setup_cb(Etk_Toggle_Button *button, void *data);
void _response_dialog_cb(Etk_Dialog *dialog, int response_id, void *data);

extern Setup_Gui *setup_gui;

#endif /*SETUP_GUI_H_*/
